﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yq.ControllerBase;
using System.Web.Mvc;

namespace yq.Controller.Sys
{
    public class HomeController : BaseController
    {
        /// <summary>
        /// 系统管理默认页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
           var model= yq.Model.Logic.SysInfo.Load(yq.ControllerBase.WebConfig.WebId);

           return View(model);
        }

        /// <summary>
        /// 左边导航
        /// </summary>
        /// <returns></returns>
        public ActionResult Navigation()
        {
            return  PartialView();
        }


        /// <summary>
        /// 清理缓存
        /// </summary>
        /// <returns></returns>
        public ActionResult CaCheRemove()
        {
            yq.Dictionary.ReturnValue<string> rv = new Dictionary.ReturnValue<string>();

            var list = this.HttpContext.Cache.GetEnumerator();
            for (;list.MoveNext(); )
            {
                this.HttpContext.Cache.Remove(list.Key.ToString());
            }
            rv.True("修改成功");

            return Json(rv);
        }
    }
}
